package service;

import java.util.List;

import dao.AdminDao;
import entity.Admin;
import util.PageTools;

public class AdminService {
	private AdminDao adminDao=new AdminDao();
	
	public boolean insertAdmin(Admin admin) {
		return adminDao.insertAdmin(admin);
	}
	 public Admin checkLogin(String aname,String apassword)
	    {
	    	return adminDao.checkLogin(aname,apassword);
	    }
	public boolean deleteAdminByAid(int aid) {
		return adminDao.deleteAdminByAid(aid);
	}
	public List<Admin> showAdmin(){
		return adminDao.selectAdmin();
	}
	public int counts() {
		return adminDao.counts();
	}
	public List<Admin> showAdminByPage(PageTools pt){
		return adminDao.selectAdminByPage(pt);
	}
	public Admin showAdminByAid(int aid) {
		return adminDao.selectAdminByAid(aid);
	}
	public boolean updateAdmin(Admin admin) {
		return adminDao.updateAdmin(admin);
	}
	

}
